package org.rjb.dao;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.shop.technicalservice.dao.shop.ShopinfoDao;
import com.shop.technicalservice.model.shop.Shopinfo;

public class ShopinfoDaoTest extends TestCase {
	private ShopinfoDao rd;

	public void setUp(){
		System.out.println("Begin Test");
		ApplicationContext ac=new ClassPathXmlApplicationContext(new String [] {"context/spring-db.xml","context/spring-dao.xml"});
		rd=(ShopinfoDao)ac.getBean("shopinfoDao");
		
	}
	public void tearDown(){
		System.out.println("End Test");
	}
	public void testSave() throws Exception{
		Shopinfo r=new Shopinfo();
		r.setName("111");
		 Shopinfo rs=(Shopinfo)rd.save(r);
		Assert.assertTrue(rs.getSequenceId()>0);
		System.out.println(rs.getSequenceId());
	}
	public void testDelete(){
		
	}
	public void testFindAll(){
		
	}
	public void testMerge(){
		
	}
}
